#coding:utf8
#
# Author: CMGS
# Created on 2010-9-29
#

from common import config as _config
from rpc import rpc as _rpc
from utils.helper import creatxml as _creatxml
from utils.protocol import xmlParser as _xmlParser

def getApiData(api, params, v = _config.V):
    url = _config.API_SERVER_URL + api + '/'
    result = _rpc.post(url, _creatxml(params), {'v': str(v)})
    return _xmlParser(result[1])['xLive']
